import { useEffect } from "react";
import { useRef } from "react"


function Son(){
  return( <div>
      你好
    </div>
  )
}

function App(){
  const h1Ref = useRef(null);
  console.log(h1Ref);
  useEffect(()=>{
    console.log(h1Ref.current);
  })
  return(
    <div>
      <h1 ref={h1Ref}>hello world</h1>
      <Son></Son>
    </div>
  )
}
export default App